package org.acra.b;

import android.util.Log;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import org.acra.ACRA;
import org.acra.c;

class i
{
  public static String a(String paramString)
  {
    int i = android.os.Process.myPid();
    if ((ACRA.getConfig().F()) && (i > 0));
    for (String str1 = Integer.toString(i) + "):"; ; str1 = null)
    {
      ArrayList localArrayList1 = new ArrayList();
      localArrayList1.add("logcat");
      if (paramString != null)
      {
        localArrayList1.add("-b");
        localArrayList1.add(paramString);
      }
      ArrayList localArrayList2 = new ArrayList(Arrays.asList(ACRA.getConfig().n()));
      int j = localArrayList2.indexOf("-t");
      int k;
      if ((j > -1) && (j < localArrayList2.size()))
      {
        k = Integer.parseInt((String)localArrayList2.get(j + 1));
        if (a.a() < 8)
        {
          localArrayList2.remove(j + 1);
          localArrayList2.remove(j);
          localArrayList2.add("-d");
        }
      }
      while (true)
      {
        label189: org.acra.d.a locala;
        if (k > 0)
        {
          locala = new org.acra.d.a(k);
          localArrayList1.addAll(localArrayList2);
        }
        try
        {
          java.lang.Process localProcess = Runtime.getRuntime().exec((String[])localArrayList1.toArray(new String[localArrayList1.size()]));
          BufferedReader localBufferedReader = new BufferedReader(new InputStreamReader(localProcess.getInputStream()), 8192);
          Log.d(ACRA.LOG_TAG, "Retrieving logcat output...");
          new Thread(new j(localProcess)).start();
          while (true)
          {
            String str2 = localBufferedReader.readLine();
            if (str2 == null)
            {
              return locala.toString();
              k = -1;
              break;
              k = 100;
              break label189;
            }
            if ((str1 == null) || (str2.contains(str1)))
              locala.add(str2 + "\n");
          }
        }
        catch (IOException localIOException)
        {
          while (true)
            Log.e(ACRA.LOG_TAG, "LogCatCollector.collectLogCat could not retrieve data.", localIOException);
        }
      }
    }
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     org.acra.b.i
 * JD-Core Version:    0.6.2
 */